import style from '.module.less'
import { save } from '@views/setmodel'
import { defineComponent } from 'vue'
import { useRouter } from 'vue-router'
import gif from './img/gif.gif'

export default defineComponent({
    setup: () => {
        const router = useRouter()
        save().then((imgSrc) => {
            console.log({ imgSrc })
            router.replace('/finish?' + imgSrc)
        })
        return () => <div class={style.root}>
            <img class='gif' src={gif} />
            <div class='title1'>正在生成形象</div>
            <div class='title2'>预计需要5-10分钟，请不要关闭手机</div>
        </div>
    }
})